<%@page import="com.kensure.shike.order.model.SKOrderBack"%>
<%@page import="com.kensure.shike.order.model.SKOrder"%>
<%@page import="co.kensure.mem.CollectionUtils"%>
<%@page import="co.kensure.mem.StringKSUtils"%>
<%@page import="com.kensure.shike.baobei.model.SKBaobei"%>
<%@page import="java.util.List"%>
<%@page import="com.kensure.shike.constant.BusiConstant"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<jsp:include page="base/header.jsp" flush="true"> 
 <jsp:param value="退货详情" name="pageTitle"/>
</jsp:include>

<style>
	.pic{width:180px;height:180px;}
</style>

<% 
  	SKOrder order = (SKOrder)request.getAttribute("order");
	List<SKOrderBack> list = (List<SKOrderBack>)request.getAttribute("list");
%>
<body>

<div id="form">
    <form id="baobei">
	     <div>
	       <label><span>*</span>名称：</label><%=StringKSUtils.nullToDefault(order.getTitle(), "")%>
	     </div>  
	     <div>
	        <label><span>*</span>类别：</label><%=order.getTypeid()==1?"换货":"退货"%>
	     </div>
	     <div>
	        <label><span>*</span>价格：</label><%=StringKSUtils.nullToDefault(order.getSalePrice(), "0")%>
	     </div>     
	      <div>
	        <label><span>*</span>原因：</label><%=StringKSUtils.nullToDefault(order.getRemark(), "")%>
	     </div> 
	  
	   	 <div class="item">
              <span class="label vt"><span>*</span>图片：</span>
              <div class="item-con" id="img-con">
              	<%
   				if(list != null){
              	for(SKOrderBack oback:list){
           	
              	%>
                  <img class="pic" src="<%=oback.getUrl()%>">
                <%}
              	}
              	
              	%>
              </div>
          </div> 
	 
	      
        <input onclick="tongyi()" id="" type="button" value="同意"> <input onclick="jujue()" id="" type="button" value="拒绝">
    </form>
</div>

</body>



<script>

	
	function setvipprice(){
		var salePrice = $('#salePrice').val();
		var vipPrice = salePrice*0.85;
		$('#vipPrice').val(vipPrice);
	}
	
	
	
	// 保存
	var baocun = false;
	function tongyi() {
		if(confirm('同意退货？')){
			if (baocun) {
				alert("请勿重复提交");
			}		
			var data = {id:<%=order.getId()%>};
			var url = getbaseurl("/order/tongyiback.do");
			postdo(url, data, null, null, svcompdo);
		}
	}
	
	function jujue() {
		if(confirm('拒绝退货？')){
			if (baocun) {
				alert("请勿重复提交");
			}		
			var data = {id:<%=order.getId()%>};
			var url = getbaseurl("/order/jujueback.do");
			postdo(url, data, null, null, svcompdo);
		}
	}
	
	function svcompdo(data) {
		baocun = false;
	}
	
     
</script>


</html>